#ifndef _SERVER_SESSION_FACTORY_H_
#define _SERVER_SESSION_FACTORY_H_

#include <MemoryPoolFactory.h>
#include <Singleton.h>
#include <const.h>

using namespace util;

class ServerSession;
class TempServerSession;
class BattleServerSession;
class FieldServerSession;
class GameDBProxySession;
class AccountDBProxySession;
class AgentServerSession;
class MasterServerSession;
class GuildServerSession;

class ServerSessionFactory : public Singleton<ServerSessionFactory>
{
public:
	ServerSessionFactory();
	~ServerSessionFactory();

	ServerSession*								AllocServerSession( eSERVER_TYPE eServerType );
	VOID										FreeServerSession( ServerSession * pServerSession );

private:
	CMemoryPoolFactory<TempServerSession>		*m_pTempServerPool;
	CMemoryPoolFactory<BattleServerSession>		*m_pBattleServerPool;
	CMemoryPoolFactory<FieldServerSession>		*m_pFieldServerPool;
	CMemoryPoolFactory<GameDBProxySession>		*m_pGameDBProxyPool;	
	CMemoryPoolFactory<AccountDBProxySession>	*m_pAccountDBProxyPool;	
	CMemoryPoolFactory<AgentServerSession>		*m_pAgentServerPool;	
	CMemoryPoolFactory<MasterServerSession>		*m_pMasterServerPool;	
	CMemoryPoolFactory<GuildServerSession>		*m_pGuildServerPool;
};


#endif // __SERVER_SESSION_FACTORY_H__